package model;

import java.awt.Component;
import java.awt.event.ItemEvent;
import java.awt.event.ItemListener;
import java.awt.event.MouseEvent;
import java.awt.event.MouseListener;
import java.util.Vector;

import javax.swing.AbstractButton;
import javax.swing.JCheckBox;
import javax.swing.JTable;
import javax.swing.table.TableCellRenderer;
import javax.swing.table.TableColumnModel;

public class Messages {
	
	private Vector<Object[]> inboxdata;
	private Vector<Object[]> spamdata;
	private Vector<Object[]> olddata;
	private Vector<Object[]> trashdata;
	
	
	public Messages()
	{
		inboxdata = new Vector(); 
		inboxdata.add(new Object[]{"Problem in room service", "Kenny","12/09/2011 19:40:24", "Room Service Department",new Boolean(false)});
		inboxdata.add(new Object[]{"Need more Chicken", "James","10/19/2011 13:30:23", "Food Department",new Boolean(false)});
		inboxdata.add(new Object[]{"Elevator Fixed", "Dan","08/05/2011 13:44:12", "Maintenance Department",new Boolean(false)});
		spamdata = new Vector(); 
		spamdata.add(new Object[]{"Problem in room service", "Kenny","12/09/2011 17:44:12", "Room Service Department",new Boolean(false)});
		olddata = new Vector(); 
		olddata.add(new Object[]{"Need cleaning", "Kenny","12/09/2011 15:44:12", "Room Service Department",new Boolean(false)});
		olddata.add(new Object[]{"Need more Chicken", "James","10/19/2011 18:24:52", "Food Department",new Boolean(false)});
		olddata.add(new Object[]{"Elevator Fixed", "Dan","08/05/2011 5:20PM", "Maintenance Department",new Boolean(false)});
		trashdata = new Vector(); 
		trashdata.add(new Object[]{"Problem in room service", "Kenny","12/09/2011 09:44:12", "Room Service Department",new Boolean(false)});

	}
	
	/**
	 * add Messages
	 * @param o
	 */
	public void addMessages(String message, String sender, String date, String dept)
	{
		inboxdata.add(new Object[]{message, sender, date, dept, new Boolean(false)});
	}
	/**
	 * get Messages
	 * @return
	 */
	public Vector<Object[]> getMessages()
	{
		return inboxdata;
	}
	/**
	 * get Messages
	 * @return
	 */
	public Vector<Object[]> getSpam()
	{
		return spamdata;
	}
	/**
	 * get Messages
	 * @return
	 */
	public Vector<Object[]> getOldMessage()
	{
		return olddata;
	}
	/**
	 * get Messages
	 * @return
	 */
	public Vector<Object[]> getTrash()
	{
		return trashdata;
	}
	/**
	 * 
	 * @param index
	 */
	public void sendTo(Vector<Object[]> from,Vector<Object[]> to, int index)
	{
		to.add(from.get(index));
		from.remove(index);
	}
	
}
